#!/usr/bin/env python


import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()

f.add(string = 'Final DFT energy',
      rel_tolerance = 1.0e-9)

f.add(string = 'Total number of tesserae',
      rel_tolerance = 1.0e-1)

f.add(string = 'Nuclear repulsion energy',
      rel_tolerance = 1.0e-10)

f.add(string = 'Point group',
      rel_tolerance = 1.0e-5)

#f.add(string = 'Center-of-mass',
#      rel_tolerance = 1.0e-5)

f.add(string = 'omega B',
      ignore_sign = True,
      rel_tolerance = 1.0e-4)

f.add(string = 'B term',
      rel_tolerance = 1.0e-3)

test.run(['Bterm_sym.dal'], ['H2O_aug-cc-pVDZ.mol'], f={'out': f})

sys.exit(test.return_code)
